package com.oig.sys.msg.api.factory;

import com.oig.sys.msg.api.TaskService;
import com.oig.sys.msg.api.fallback.TaskServiceFallBackImpl;
import org.springframework.cloud.openfeign.FallbackFactory;

public class TaskServiceFallbackFactory implements FallbackFactory<TaskService> {

    @Override
    public TaskService create(Throwable cause) {
        TaskServiceFallBackImpl taskServiceFallBack = new TaskServiceFallBackImpl();
        taskServiceFallBack.setCause(cause);
        return taskServiceFallBack;
    }

}
